﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CasaBella.Entities;

namespace CasaBella.Repository
{
    public class TelefonoProveedorRepository:MasterRepository,ITelefonoProveedorRepository
    {
        public List<TELEFONOS_PROVEEDOR> GetAllFromTelefonoProveedor()
        {
            var query = from c in context.TELEFONOS_PROVEEDOR.Include("PROVEEDOR")
                        select c;
            return query.ToList();
        }

        public List<TELEFONOS_PROVEEDOR> GetAllFromTelefonoProveedorByProveedor(string ruc)
        {
            var query = from c in context.TELEFONOS_PROVEEDOR.Include("PROVEEDOR")
                        where c.PROVEEDOR.Ruc.Contains(ruc)
                        select c;
            return query.ToList();
        }
    }
}
